1.2. Requirements
When connected by LAN, the transport is HTTP (port 8008 by default), with requests sent via POST.
The serial-port transport frame is structured as
(STX) data (CRC32) (ETX)
where
STX
= 0x02,
ETX
= 0x03,
CRC32
is computed over the raw data bytes, and any byte equal to 0x03 in the data is first replaced with 0x20.
Each request carries two parameters in the body, separated by &
:
data
– the message container (JSON, UTF-8, then Base64-encoded)sign
– the signature
When using the serial port, an additional command
parameter specifies the endpoint.
The message container is JSON
.
The encoding is UTF-8
.
The JSON
string is Base64-encoded
.
The signature is generated as the Base64 encoding of the SHA-1 hash (in lowercase hexadecimal) of the data
parameter concatenated with the merchantID
.
In the request parameters, any “=” characters are URL-encoded before sending.
The merchantID
parameter is issued during cash register registration.